package com.sxbbc.plat.controller.banks;


import com.sxbbc.bank.service.IBankLoanApplyRecordService;
import com.sxbbc.bank.service.IBankLoanApplyTrackService;
import com.sxbbc.common.basics.rest.RestResponse;
import com.sxbbc.common.core.entity.banks.BankLoanApplyTrack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class BankLoanApplyTrackController {


    @Autowired
    private IBankLoanApplyTrackService iBankLoanApplyTrackService;



    @RequestMapping(value ="/bankloanapplytrack/listDate")
    @ResponseBody
    public RestResponse selectChickenBonusDay(String id) {
        RestResponse restResponse=new RestResponse();
        restResponse.setCode("200");
        restResponse.setData(iBankLoanApplyTrackService.listDate(id));
        return  restResponse;
    }

    @RequestMapping(value ="/bankloanapplytrack/save")
    @ResponseBody
    public RestResponse save(BankLoanApplyTrack bankLoanApplyTrack) {
        RestResponse restResponse=new RestResponse();
        if(iBankLoanApplyTrackService.saveBankLoanApplyTrack(bankLoanApplyTrack)){
            restResponse.setCode("200");
            restResponse.setMsg("保存成功");
        }else {
            restResponse.setCode("500");
            restResponse.setMsg("保存失败");
        }
        return restResponse;
    }

}
